import { interval } from "rxjs";
import { bufferTime, bufferCount } from "rxjs/operators";
/* interval(1000)
  .pipe(bufferTime(3000))
  .subscribe(console.log)

  // 打印结果
  [0,1]
  [2,3,4,5]
  [6,7,8]

 */

interval(1000).pipe(bufferCount(3)).subscribe(console.log);
// 打印结果
// [0,1,2]
// [2,3,4]
// [5,6,7]
